package com.itheima.day20.demo07;

import java.util.function.Consumer;

public class ConsumerDemo01 {
    public static void main(String[] args) {
        consumerT("123", e -> System.out.println(e));
        consumerT(123, e -> System.out.println(e * e));
    }

    public static <T> void consumerT(T t, Consumer<T> consumer) {
        consumer.accept(t);
    }
}
